From: Jan Beulich Date: Fri, 2 Sep 2016 12:18:52 +0000 (+0200) Subject: x86: correct PT_NOTE file position X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~484 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=f8f185dc4359a1cd8e7896dfbcacb54b473436c8;p=xen.git x86: correct PT_NOTE file position Program and section headers disagreed about the file offset at which the build ID note lives. Reported-by: Sylvain Munaut Signed-off-by: Jan Beulich Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/boot/mkelf32.c b/xen/arch/x86/boot/mkelf32.c index e66740fc16..bcbde1a056 100644 --- a/xen/arch/x86/boot/mkelf32.c +++ b/xen/arch/x86/boot/mkelf32.c @@ -394,7 +394,7 @@ int main(int argc, char **argv) note_phdr.p_paddr = note_base; note_phdr.p_filesz = note_sz; note_phdr.p_memsz = note_sz; - note_phdr.p_offset = offset; + note_phdr.p_offset = RAW_OFFSET + offset; /* Tack on the .note\0 */ out_shdr[2].sh_size += sizeof(out_shstrtab_extra);